package org.onvivals.module.pms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.onvivals.common.base.BaseEntity;

import java.io.Serial;

@EqualsAndHashCode(callSuper = true)
@Schema(description = "历史记录")
@Data
@TableName(value = "pms_history", autoResultMap = true)
public class PmsHistory extends BaseEntity<PmsHistory> {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "ID")
    private Long id;

    @TableField(value = "device_id")
    @Schema(description = "设备号")
    private String deviceId;

    @TableField(value = "`role`")
    @Schema(description = "角色 system user")
    private String role;

    @TableField(value = "content")
    @Schema(description = "内容")
    private String content;

}
